home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / HyperTalk / Reference Material / hypercard-popupmenus-script.txt < prev    next >
Encoding:
Internet Message Format  |  1988-01-14  |  629 b   |  [TEXT/????]

  1. Date:      Mon, 23 Nov 87 09:00:10 PST
  2. From:     PUGH@NMFECC.ARPA
  3. Subject:   PopUpMenu Script
  4.  
  5. Here is a sample script to use the PopUpMenu XCMD that was recently posted.
  6.  
  7. on mouseDown
  8.   global lastItem
  9.   if lastItem is empty then put 0 into lastItem
  10.   get the rect of card window
  11.   put "(Pick a Number,(-,One,Two,Three,Four" into choices
  12.   put PopUpMenu(choices, lastItem,-
  13.   (the mouseV + item 2 of it),-
  14.   (the mouseH + item 1 of it)) into junk
  15.   if junk is not 0 then
  16.     put junk into lastItem
  17.     put "Why does everyone pick" && item lastItem of choices & "?" into msg
  18.     wait 1 secs
  19.     hide msg
  20.   end if
  21. end mouseDown
  22.  
  23. Jon
  24.